﻿using System;
using CCF20Model;
using System.Collections;
using WiseLink.RDS.Resource;
namespace CCF20Module.DeviceState
{
    public class DeliverState : DeviceStateBase
    {

        public DeliverState(IDeviceHandler handler, DeviceModel model,VehicleModel vModel, Device device, IList list)
            : base(handler, model, vModel,device, list)
        {
            this.failReason = DeviceStatus.Shipped;
            StateName = DeviceStatus.Shipped;
            //LoggerHelper.LogCCF20("进入在途状态初始化");
        }

        #region ExecuteAction

        public override string runInStock()
        {
            currentDevice.InStockDate = DateTime.Now;
            currentDevice.DeviceStatus = DeviceStatus.InStock;
            deviceModel.Update();
            this.deviceHandler.setState(deviceHandler.getInStockState());
            return string.Format(Message.Device_InStock_Succeed, currentDevice.IDCSimNumber);

        }

        public override string runSellToCustomer(int customerId)
        {
            return base.runSellToCustomer(customerId);
        }

        public override string runRegisterIDC()
        {
            return base.runRegisterIDC();
        }
        public override string runUnRegisterIDC()
        {
            return base.runUnRegisterIDC();
        }
        public override string runRegisterSpeicalIDC()
        {
            return base.runRegisterSpeicalIDC();
        }
        public override string runUnRegisterSpeicalIDC()
        {
            return base.runUnRegisterSpeicalIDC();
        }

        public override string runExchangeDevice(string idc, string deviceKey)
        {
            return  Message.Device_CantExchagne_Shipped;
        }

        public override string runReturnDevice()
        {
            return base.runReturnDevice();
        }

        
        public override string runDeleteDevice()
        {
            return base.runDeleteDevice();
        }

        #endregion
    }
}
